package top.zhan.decorator;

/**
 * RSC是防爆胎的缩写，角色 ConcreteDecorator
 * @author Zhan
 * @date 2022/10/2 14:00
 */
public class RSCBikeDecorator extends BikeDecorator {

    private String description = "增加一个防爆胎";

    private Bike bike;

    public RSCBikeDecorator(Bike bike){
        this.bike = bike;
    }

    @Override
    public String getDescription() {
        return bike.getDescription() + "," + description;
    }

    /**
     * 100元是防爆胎的价格
     * @return
     */
    @Override
    public int getPrice() {
        return bike.getPrice() + 100;
    }
}
